#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H

#include <QDialog>
#include <QKeyEvent>

#include "patientwindow.h"
#include "doctorwindow.h"
#include "mode.h"

namespace Ui {
class LoginDialog;
}

class LoginDialog : public QDialog
{
    Q_OBJECT

public:
    explicit LoginDialog(QWidget *parent = nullptr, mode m=patient);
    ~LoginDialog();
    void setCurrentPage(mode m);

protected:
    virtual void keyPressEvent(QKeyEvent *ev);

private slots:
    void on_pushButton_patientLogin_clicked();

    void on_pushButton_doctorLogin_clicked();

private:
    Ui::LoginDialog *ui;

signals:
    void patientLoginSuccess();

    void doctorLoginSuccess();
};

#endif // LOGINDIALOG_H
